package com.swordget.conf;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Author: David
 * @Date: Created in 16:48 2020/4/22
 * @Description: ${DESCRIPTION}
 * @Modified By:
 * @Version: ${VERSION}
 */
public class FormatTest {

    public static void main(String[] args) {

        System.out.println(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
        System.out.println(new SimpleDateFormat("yyyy/MM/dd").format(new Date()));
        System.out.println(new SimpleDateFormat("yyyy年MM月dd日").format(new Date()));
        System.out.println(new SimpleDateFormat("yy-MM-dd").format(new Date()));
        System.out.println(new SimpleDateFormat("yy/MM/dd").format(new Date()));
        System.out.println(new SimpleDateFormat("yy年MM月dd日").format(new Date()));
        System.out.println(new SimpleDateFormat("j").format(new Date()));

    }
}
